package cn.easy.pojo;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class SensorExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public SensorExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andSensorIdIsNull() {
            addCriterion("sensor_id is null");
            return (Criteria) this;
        }

        public Criteria andSensorIdIsNotNull() {
            addCriterion("sensor_id is not null");
            return (Criteria) this;
        }

        public Criteria andSensorIdEqualTo(Integer value) {
            addCriterion("sensor_id =", value, "sensorId");
            return (Criteria) this;
        }

        public Criteria andSensorIdNotEqualTo(Integer value) {
            addCriterion("sensor_id <>", value, "sensorId");
            return (Criteria) this;
        }

        public Criteria andSensorIdGreaterThan(Integer value) {
            addCriterion("sensor_id >", value, "sensorId");
            return (Criteria) this;
        }

        public Criteria andSensorIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("sensor_id >=", value, "sensorId");
            return (Criteria) this;
        }

        public Criteria andSensorIdLessThan(Integer value) {
            addCriterion("sensor_id <", value, "sensorId");
            return (Criteria) this;
        }

        public Criteria andSensorIdLessThanOrEqualTo(Integer value) {
            addCriterion("sensor_id <=", value, "sensorId");
            return (Criteria) this;
        }

        public Criteria andSensorIdIn(List<Integer> values) {
            addCriterion("sensor_id in", values, "sensorId");
            return (Criteria) this;
        }

        public Criteria andSensorIdNotIn(List<Integer> values) {
            addCriterion("sensor_id not in", values, "sensorId");
            return (Criteria) this;
        }

        public Criteria andSensorIdBetween(Integer value1, Integer value2) {
            addCriterion("sensor_id between", value1, value2, "sensorId");
            return (Criteria) this;
        }

        public Criteria andSensorIdNotBetween(Integer value1, Integer value2) {
            addCriterion("sensor_id not between", value1, value2, "sensorId");
            return (Criteria) this;
        }

        public Criteria andSensorTypeIsNull() {
            addCriterion("sensor_type is null");
            return (Criteria) this;
        }

        public Criteria andSensorTypeIsNotNull() {
            addCriterion("sensor_type is not null");
            return (Criteria) this;
        }

        public Criteria andSensorTypeEqualTo(Integer value) {
            addCriterion("sensor_type =", value, "sensorType");
            return (Criteria) this;
        }

        public Criteria andSensorTypeNotEqualTo(Integer value) {
            addCriterion("sensor_type <>", value, "sensorType");
            return (Criteria) this;
        }

        public Criteria andSensorTypeGreaterThan(Integer value) {
            addCriterion("sensor_type >", value, "sensorType");
            return (Criteria) this;
        }

        public Criteria andSensorTypeGreaterThanOrEqualTo(Integer value) {
            addCriterion("sensor_type >=", value, "sensorType");
            return (Criteria) this;
        }

        public Criteria andSensorTypeLessThan(Integer value) {
            addCriterion("sensor_type <", value, "sensorType");
            return (Criteria) this;
        }

        public Criteria andSensorTypeLessThanOrEqualTo(Integer value) {
            addCriterion("sensor_type <=", value, "sensorType");
            return (Criteria) this;
        }

        public Criteria andSensorTypeIn(List<Integer> values) {
            addCriterion("sensor_type in", values, "sensorType");
            return (Criteria) this;
        }

        public Criteria andSensorTypeNotIn(List<Integer> values) {
            addCriterion("sensor_type not in", values, "sensorType");
            return (Criteria) this;
        }

        public Criteria andSensorTypeBetween(Integer value1, Integer value2) {
            addCriterion("sensor_type between", value1, value2, "sensorType");
            return (Criteria) this;
        }

        public Criteria andSensorTypeNotBetween(Integer value1, Integer value2) {
            addCriterion("sensor_type not between", value1, value2, "sensorType");
            return (Criteria) this;
        }

        public Criteria andDeviceIdIsNull() {
            addCriterion("device_id is null");
            return (Criteria) this;
        }

        public Criteria andDeviceIdIsNotNull() {
            addCriterion("device_id is not null");
            return (Criteria) this;
        }

        public Criteria andDeviceIdEqualTo(Integer value) {
            addCriterion("device_id =", value, "deviceId");
            return (Criteria) this;
        }

        public Criteria andDeviceIdNotEqualTo(Integer value) {
            addCriterion("device_id <>", value, "deviceId");
            return (Criteria) this;
        }

        public Criteria andDeviceIdGreaterThan(Integer value) {
            addCriterion("device_id >", value, "deviceId");
            return (Criteria) this;
        }

        public Criteria andDeviceIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("device_id >=", value, "deviceId");
            return (Criteria) this;
        }

        public Criteria andDeviceIdLessThan(Integer value) {
            addCriterion("device_id <", value, "deviceId");
            return (Criteria) this;
        }

        public Criteria andDeviceIdLessThanOrEqualTo(Integer value) {
            addCriterion("device_id <=", value, "deviceId");
            return (Criteria) this;
        }

        public Criteria andDeviceIdIn(List<Integer> values) {
            addCriterion("device_id in", values, "deviceId");
            return (Criteria) this;
        }

        public Criteria andDeviceIdNotIn(List<Integer> values) {
            addCriterion("device_id not in", values, "deviceId");
            return (Criteria) this;
        }

        public Criteria andDeviceIdBetween(Integer value1, Integer value2) {
            addCriterion("device_id between", value1, value2, "deviceId");
            return (Criteria) this;
        }

        public Criteria andDeviceIdNotBetween(Integer value1, Integer value2) {
            addCriterion("device_id not between", value1, value2, "deviceId");
            return (Criteria) this;
        }

        public Criteria andSensorStateIsNull() {
            addCriterion("sensor_state is null");
            return (Criteria) this;
        }

        public Criteria andSensorStateIsNotNull() {
            addCriterion("sensor_state is not null");
            return (Criteria) this;
        }

        public Criteria andSensorStateEqualTo(Integer value) {
            addCriterion("sensor_state =", value, "sensorState");
            return (Criteria) this;
        }

        public Criteria andSensorStateNotEqualTo(Integer value) {
            addCriterion("sensor_state <>", value, "sensorState");
            return (Criteria) this;
        }

        public Criteria andSensorStateGreaterThan(Integer value) {
            addCriterion("sensor_state >", value, "sensorState");
            return (Criteria) this;
        }

        public Criteria andSensorStateGreaterThanOrEqualTo(Integer value) {
            addCriterion("sensor_state >=", value, "sensorState");
            return (Criteria) this;
        }

        public Criteria andSensorStateLessThan(Integer value) {
            addCriterion("sensor_state <", value, "sensorState");
            return (Criteria) this;
        }

        public Criteria andSensorStateLessThanOrEqualTo(Integer value) {
            addCriterion("sensor_state <=", value, "sensorState");
            return (Criteria) this;
        }

        public Criteria andSensorStateIn(List<Integer> values) {
            addCriterion("sensor_state in", values, "sensorState");
            return (Criteria) this;
        }

        public Criteria andSensorStateNotIn(List<Integer> values) {
            addCriterion("sensor_state not in", values, "sensorState");
            return (Criteria) this;
        }

        public Criteria andSensorStateBetween(Integer value1, Integer value2) {
            addCriterion("sensor_state between", value1, value2, "sensorState");
            return (Criteria) this;
        }

        public Criteria andSensorStateNotBetween(Integer value1, Integer value2) {
            addCriterion("sensor_state not between", value1, value2, "sensorState");
            return (Criteria) this;
        }

        public Criteria andSensorCreatetimeIsNull() {
            addCriterion("sensor_createTime is null");
            return (Criteria) this;
        }

        public Criteria andSensorCreatetimeIsNotNull() {
            addCriterion("sensor_createTime is not null");
            return (Criteria) this;
        }

        public Criteria andSensorCreatetimeEqualTo(Date value) {
            addCriterion("sensor_createTime =", value, "sensorCreatetime");
            return (Criteria) this;
        }

        public Criteria andSensorCreatetimeNotEqualTo(Date value) {
            addCriterion("sensor_createTime <>", value, "sensorCreatetime");
            return (Criteria) this;
        }

        public Criteria andSensorCreatetimeGreaterThan(Date value) {
            addCriterion("sensor_createTime >", value, "sensorCreatetime");
            return (Criteria) this;
        }

        public Criteria andSensorCreatetimeGreaterThanOrEqualTo(Date value) {
            addCriterion("sensor_createTime >=", value, "sensorCreatetime");
            return (Criteria) this;
        }

        public Criteria andSensorCreatetimeLessThan(Date value) {
            addCriterion("sensor_createTime <", value, "sensorCreatetime");
            return (Criteria) this;
        }

        public Criteria andSensorCreatetimeLessThanOrEqualTo(Date value) {
            addCriterion("sensor_createTime <=", value, "sensorCreatetime");
            return (Criteria) this;
        }

        public Criteria andSensorCreatetimeIn(List<Date> values) {
            addCriterion("sensor_createTime in", values, "sensorCreatetime");
            return (Criteria) this;
        }

        public Criteria andSensorCreatetimeNotIn(List<Date> values) {
            addCriterion("sensor_createTime not in", values, "sensorCreatetime");
            return (Criteria) this;
        }

        public Criteria andSensorCreatetimeBetween(Date value1, Date value2) {
            addCriterion("sensor_createTime between", value1, value2, "sensorCreatetime");
            return (Criteria) this;
        }

        public Criteria andSensorCreatetimeNotBetween(Date value1, Date value2) {
            addCriterion("sensor_createTime not between", value1, value2, "sensorCreatetime");
            return (Criteria) this;
        }

        public Criteria andSensorUpdatetimeIsNull() {
            addCriterion("sensor_updateTime is null");
            return (Criteria) this;
        }

        public Criteria andSensorUpdatetimeIsNotNull() {
            addCriterion("sensor_updateTime is not null");
            return (Criteria) this;
        }

        public Criteria andSensorUpdatetimeEqualTo(Date value) {
            addCriterion("sensor_updateTime =", value, "sensorUpdatetime");
            return (Criteria) this;
        }

        public Criteria andSensorUpdatetimeNotEqualTo(Date value) {
            addCriterion("sensor_updateTime <>", value, "sensorUpdatetime");
            return (Criteria) this;
        }

        public Criteria andSensorUpdatetimeGreaterThan(Date value) {
            addCriterion("sensor_updateTime >", value, "sensorUpdatetime");
            return (Criteria) this;
        }

        public Criteria andSensorUpdatetimeGreaterThanOrEqualTo(Date value) {
            addCriterion("sensor_updateTime >=", value, "sensorUpdatetime");
            return (Criteria) this;
        }

        public Criteria andSensorUpdatetimeLessThan(Date value) {
            addCriterion("sensor_updateTime <", value, "sensorUpdatetime");
            return (Criteria) this;
        }

        public Criteria andSensorUpdatetimeLessThanOrEqualTo(Date value) {
            addCriterion("sensor_updateTime <=", value, "sensorUpdatetime");
            return (Criteria) this;
        }

        public Criteria andSensorUpdatetimeIn(List<Date> values) {
            addCriterion("sensor_updateTime in", values, "sensorUpdatetime");
            return (Criteria) this;
        }

        public Criteria andSensorUpdatetimeNotIn(List<Date> values) {
            addCriterion("sensor_updateTime not in", values, "sensorUpdatetime");
            return (Criteria) this;
        }

        public Criteria andSensorUpdatetimeBetween(Date value1, Date value2) {
            addCriterion("sensor_updateTime between", value1, value2, "sensorUpdatetime");
            return (Criteria) this;
        }

        public Criteria andSensorUpdatetimeNotBetween(Date value1, Date value2) {
            addCriterion("sensor_updateTime not between", value1, value2, "sensorUpdatetime");
            return (Criteria) this;
        }

        public Criteria andSensorNameIsNull() {
            addCriterion("sensor_name is null");
            return (Criteria) this;
        }

        public Criteria andSensorNameIsNotNull() {
            addCriterion("sensor_name is not null");
            return (Criteria) this;
        }

        public Criteria andSensorNameEqualTo(String value) {
            addCriterion("sensor_name =", value, "sensorName");
            return (Criteria) this;
        }

        public Criteria andSensorNameNotEqualTo(String value) {
            addCriterion("sensor_name <>", value, "sensorName");
            return (Criteria) this;
        }

        public Criteria andSensorNameGreaterThan(String value) {
            addCriterion("sensor_name >", value, "sensorName");
            return (Criteria) this;
        }

        public Criteria andSensorNameGreaterThanOrEqualTo(String value) {
            addCriterion("sensor_name >=", value, "sensorName");
            return (Criteria) this;
        }

        public Criteria andSensorNameLessThan(String value) {
            addCriterion("sensor_name <", value, "sensorName");
            return (Criteria) this;
        }

        public Criteria andSensorNameLessThanOrEqualTo(String value) {
            addCriterion("sensor_name <=", value, "sensorName");
            return (Criteria) this;
        }

        public Criteria andSensorNameLike(String value) {
            addCriterion("sensor_name like", value, "sensorName");
            return (Criteria) this;
        }

        public Criteria andSensorNameNotLike(String value) {
            addCriterion("sensor_name not like", value, "sensorName");
            return (Criteria) this;
        }

        public Criteria andSensorNameIn(List<String> values) {
            addCriterion("sensor_name in", values, "sensorName");
            return (Criteria) this;
        }

        public Criteria andSensorNameNotIn(List<String> values) {
            addCriterion("sensor_name not in", values, "sensorName");
            return (Criteria) this;
        }

        public Criteria andSensorNameBetween(String value1, String value2) {
            addCriterion("sensor_name between", value1, value2, "sensorName");
            return (Criteria) this;
        }

        public Criteria andSensorNameNotBetween(String value1, String value2) {
            addCriterion("sensor_name not between", value1, value2, "sensorName");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}